package com.atguigu.spring.controller;

import com.atguigu.spring.service.api.HappyService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;

@Controller
public class HappyController {

    @Resource
    private HappyService happyService;

    @Value("${atguigu.message}")
    private String message;

    public void doSomething() {
        System.out.println("HappyController.doSomething");
        happyService.doSomething();
        System.out.println("message = " + message);
    }
}
